package com.selenium.page;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import com.selenium.base.DriverBase;

public class BasePage {
	DriverBase driver;
	public BasePage(DriverBase driver) {
		this.driver = driver;
	}
	
	public WebElement findElement(By by) {
		WebElement element = this.driver.findElement(by);
		return element;
	}
	
	public void click(WebElement element) {
		element.click();
	}
	
	public void sendKeys(WebElement element,String value) {
		element.sendKeys(value);
	}
	
	public boolean assertElementIs(WebElement element) {
		return element.isDisplayed();
	}
}
